package net.lee.shiro.demo.entity.usersystem;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "module", schema = "admin_system", catalog = "")
public class ModuleEntity {
    private long moduleId;
    private String moduleName;
    private String moduleImage;
    private String remark;
    private String moduleAppName;

    @Id
    @Column(name = "module_id")
    public long getModuleId() {
        return moduleId;
    }

    public void setModuleId(long moduleId) {
        this.moduleId = moduleId;
    }

    @Basic
    @Column(name = "module_name")
    public String getModuleName() {
        return moduleName;
    }

    public void setModuleName(String moduleName) {
        this.moduleName = moduleName;
    }

    @Basic
    @Column(name = "module_image")
    public String getModuleImage() {
        return moduleImage;
    }

    public void setModuleImage(String moduleImage) {
        this.moduleImage = moduleImage;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "module_app_name")
    public String getModuleAppName() {
        return moduleAppName;
    }

    public void setModuleAppName(String moduleAppName) {
        this.moduleAppName = moduleAppName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ModuleEntity that = (ModuleEntity) o;
        return moduleId == that.moduleId &&
                Objects.equals(moduleName, that.moduleName) &&
                Objects.equals(moduleImage, that.moduleImage) &&
                Objects.equals(remark, that.remark) &&
                Objects.equals(moduleAppName, that.moduleAppName);
    }

    @Override
    public int hashCode() {

        return Objects.hash(moduleId, moduleName, moduleImage, remark, moduleAppName);
    }
}
